
package com.limoilux.cobolux.ui.perspective;

import org.eclipse.debug.ui.IDebugUIConstants;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
import org.eclipse.ui.console.IConsoleConstants;
import org.eclipse.ui.progress.IProgressConstants;

import com.limoilux.cobolux.ui.wizards.ProjectWizard;
import com.limoilux.cobolux.ui.wizards.SourceWizard;

public class CoboluxPerspective implements IPerspectiveFactory
{
	@Override
	public void createInitialLayout(IPageLayout layout)
	{
		String editorArea = layout.getEditorArea();

		layout.addNewWizardShortcut(ProjectWizard.EXTENSION);
		layout.addNewWizardShortcut(SourceWizard.EXTENSION);

		IFolderLayout folder = layout.createFolder("left", IPageLayout.LEFT, (float) 0.20, editorArea);
		folder.addView(IPageLayout.ID_PROJECT_EXPLORER);

		IFolderLayout folder2 = layout.createFolder("leftBottom", IPageLayout.BOTTOM, (float) 0.50, "left");
		folder2.addView(IPageLayout.ID_OUTLINE);

		IFolderLayout outputfolder = layout.createFolder("bottom", IPageLayout.BOTTOM, (float) 0.75, editorArea);
		outputfolder.addView(IPageLayout.ID_PROBLEM_VIEW);
		outputfolder.addView(IConsoleConstants.ID_CONSOLE_VIEW);
		outputfolder.addPlaceholder(IPageLayout.ID_BOOKMARKS);
		outputfolder.addPlaceholder(IProgressConstants.PROGRESS_VIEW_ID);
		
		layout.addActionSet(IDebugUIConstants.LAUNCH_ACTION_SET);
		layout.addShowViewShortcut(IConsoleConstants.ID_CONSOLE_VIEW);
	}
}
